#!/usr/bin/env bash

GOPATH=`pwd`

if [ ! $1 ]
then
# -race检测程序中是否发生了竞争
GOPATH=`pwd` go run -race main.go
exit 0
fi

if [ $1 == 'test' ]
then
GOPATH=`pwd` go test ./test/
elif [ $1 == 'start' ]
then
GOPATH=`pwd` go run main.go
else
echo '未知命令'
fi
